#ifndef FIND_GUI_EVENT_HANDLER_BY_ID_VISITOR
#define FIND_GUI_EVENT_HANDLER_BY_ID_VISITOR 1

#include <vector>
#include <string>

#include <osg/NodeVisitor>
#include <osgGA/GUIEventHandler>
#include <osgViewer/Viewer>
class FindGUIEventHandlerByIdVisitor : public osg::NodeVisitor
{
public:
	FindGUIEventHandlerByIdVisitor();
	
	virtual ~FindGUIEventHandlerByIdVisitor();

	virtual void apply(osgViewer::Viewer& viewer);
	void setIdString(const std::string& id_string);

	osg::ref_ptr<osgGA::GUIEventHandler> getFindedGUIEventHandler();

private:
	std::string _id_string;
	osg::ref_ptr<osgGA::GUIEventHandler> _finded_gui_event_handler;
	
};

#endif //!FIND_GUI_EVENT_HANDLER_BY_ID_VISITOR